#include<bits/stdc++.h>
using namespace std;
#define int long long
int n,a[100010];
multiset<int> s;
signed main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++) cin>>a[i];
    sort(a+1,a+n+1);
    int ans=0;
    for(int i=1;i<=n;i++){
        if(s.empty()||a[i]<=*s.begin()) s.insert(a[i]);
        else{
            s.erase(s.find(*s.begin()));
            ans++;
            s.insert(a[i]);
        }
    }
    cout<<n-ans<<endl;
    return 0;
}
